﻿@using VirtualPress.Infrastructure.Entities.Entity;
@{
    Meeting meeting = ViewBag.Meeting;
    ViewBag.Title = "会议初始化";
    Layout = "/Areas/WorkSpace/Views/Shared/_WorkSpace.cshtml";
}
<div id="content-header">
    <h1>
        初始化会议设置</h1>
</div>
<div id="breadcrumb">
    <a href="/WorkSpace/Home" class="tip-bottom"><i class="icon-home"></i>起始页</a> <a
        class="current">会议初始化</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-pencil"></i></span>
                    <h5>
                        初始化会议设置</h5>
                    <h5 style="float: right; color: Red;">
                    </h5>
                </div>
                <div class="alert alert-info">
                    <strong>会议初始化!</strong> 请先初始化设置您的会议
                </div>
                <div class="widget-content nopadding">
                    <form id="form-wizard" class="form-horizontal" method="post" enctype="multipart/form-data"
                    action="/WorkSpace/meeting/install">
                    <input type="hidden" name="meeting" value="@meeting.Id" />
                    <div id="form-wizard-1" class="step">
                        <div class="control-group">
                            <label class="control-label">
                                登录密码 (*)
                            </label>
                            <div class="controls">
                                <input type="password" id="iptPassword" placeholder="密码长度6-20位" name="Password" class="{required:true,minlength:6,maxlength:20}" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                确认密码 (*)
                            </label>
                            <div class="controls">
                                <input type="password" id="iptPasswordAgain" placeholder="请确保两次输入一致" name="confirm"
                                    class="{required:true,equalTo:'#iptPassword'}" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                编辑部邮箱 (*)</label>
                            <div class="controls">
                                <input id="txtEmail" type="text" name="Email" class="{required:true,email:true}" value="@meeting.Email"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                联系人信息 (*)
                            </label>
                            <div class="controls">
                                <textarea name="ContactInfo" rows="10" cols="10" class="{required:true}"></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                地址 (*)
                            </label>
                            <div class="controls">
                                <input type="text" id="txtAddress" name="Address" class="{required:true}" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                传真
                            </label>
                            <div class="controls">
                                <input type="text" id="txtFax" name="Fax" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                主办单位
                            </label>
                            <div class="controls">
                                <input type="text" id="txtZBDW" name="ZBDW" value="@meeting.ZBDW" readonly="readonly" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                承办单位 (*)
                            </label>
                            <div class="controls">
                                <input type="text" id="txtCBDW" name="CBDW" class="{required:true}" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                会议日期 (*)
                            </label>
                            <div class="controls">
                                <div id="dpStartDate" class="input-append span3">
                                    <input id="txtStartDate" data-format="yyyy-MM-dd" type="text" name="StartDate" class="{required:true,dateISO:true}" />
                                    <span class="add-on"><i class="icon-calendar" data-time-icon="icon-time" data-date-icon="icon-calendar">
                                    </i></span>
                                </div>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                截稿日期 (*)
                            </label>
                            <div class="controls">
                                <div id="dpArticleEndDate" class="input-append span3">
                                    <input id="txtArticleEndDate" data-format="yyyy-MM-dd" type="text" name="ArticleEndDate"
                                        class="{required:true,dateISO:true}" />
                                    <span class="add-on"><i class="icon-calendar" data-time-icon="icon-time" data-date-icon="icon-calendar">
                                    </i></span>
                                </div>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                会议规模
                            </label>
                            <div class="controls">
                                <input type="text" id="txtHYGM" name="HYGM" />
                            </div>
                        </div>
                    </div>
                    <div id="form-wizard-2" class="step">
                        <div class="control-group">
                            <label class="control-label">
                                会议简介
                            </label>
                            <div class="controls">
                                <script name="Abstract" id="txtAbstract" type="text/plain"></script>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                会议介绍（详情）
                            </label>
                            <div class="controls">
                                <script name="About" id="txtAbout" type="text/plain"></script>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                征稿启事
                            </label>
                            <div class="controls">
                                <script name="CallForPaper" id="txtCallForPaper" type="text/plain"></script>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                作者须知
                            </label>
                            <div class="controls">
                                <script name="Attention" id="txtAttention" type="text/plain"></script>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                征稿范围 (*)
                            </label>
                            <div class="controls">
                                <textarea class="{required:true}" cols="20" rows="10" name="ZGFW"></textarea>
                                <label>
                                    本会议的征稿范围。多个范围用 ';' 分割</label>
                            </div>
                        </div>
                    </div>
                    <div id="form-wizard-3" class="step">
                        <div class="control-group">
                            <label class="control-label">
                                组委会
                            </label>
                            <div class="controls">
                                <script name="Committee" id="txtCommittee" type="text/plain"></script>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                联系我们
                            </label>
                            <div class="controls">
                                <script name="AboutUs" id="txtAboutUs" type="text/plain"></script>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                日程安排 (*)
                            </label>
                            <div class="controls">
                                <textarea class="{required:true}" cols="20" rows="10" name="Schedule"></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                会后旅游
                            </label>
                            <div class="controls">
                                <script name="Travel" id="txtTravel" type="text/plain"></script>
                            </div>
                        </div>
                    </div>
                    <div id="form-wizard-4" class="step">
                        <div class="control-group">
                            <label class="control-label">
                                默认稿件审回时间 (天)
                            </label>
                            <div class="controls">
                                <input name="DefaultExamineDay" class="{required:true,digits:true}" type="text" value="@meeting.DefaultExamineDay" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                稿件基准页数
                            </label>
                            <div class="controls">
                                <input name="ManuscriptPageSize" class="{required:true,digits:true}" type="text" value="@meeting.ManuscriptPageSize" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                是否收取专审费用
                            </label>
                            <div class="controls">
                                <select name="isFeeForExpertExmaine" onchange="changeFeeSet(this)">
                                    <option value="true" selected="selected">收费</option>
                                    <option value="false">不收费</option>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                基准专审费用
                            </label>
                            <div class="controls">
                                <input id="txtPagePrice" name="PagePrice" class="{required:true,digits:true}" type="text" value="@meeting.PagePrice" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                超页价格
                            </label>
                            <div class="controls">
                                <input name="PricePerPrice" class="{required:true,digits:true}" type="text" value="@meeting.PricePerPrice" />
                                <span>每超过1页价格</span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                基准出版版面费
                            </label>
                            <div class="controls">
                                <input name="PublicationPrice" class="{required:true,digits:true}" type="text" value="@meeting.PublicationPrice" />
                            </div>
                        </div>
                    </div>
                    <div class="form-actions">
                        <a class="btn btn-primary" href="/workspace/console/index">返回</a>
                        <input id="next" class="btn btn-primary" type="submit" value="保存" />
                    </div>
                    <div id="submitted">
                    </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@section tail
{
    <script type="text/javascript" src="/scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/scripts/unicorn.wizard.js"></script>
    <script type="text/javascript" src="/scripts/jquery.metadata.js"></script>
    <script type="text/javascript" src="/scripts/jquery.wizard.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Scripts/UEditor/editor_config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Scripts/UEditor/editor_all_min.js"></script>
    <script type="text/javascript">
        UE.getEditor('txtAbstract');
        UE.getEditor('txtCallForPaper');
        UE.getEditor('txtAttention');
        UE.getEditor('txtTravel');
        UE.getEditor('txtAbout');
        UE.getEditor('txtCommittee');
        UE.getEditor('txtAboutUs'); 
        $(function () {
            $('#dpStartDate').datetimepicker({
                pickTime: false
            });
            $('#dpArticleEndDate').datetimepicker({
                pickTime: false
            });
        });
        function changeFeeSet(sender) {
            var val = $(sender).val();
            if (/false/i.test(val)) {
                $('#txtPagePrice').attr('disabled', 'disabled');
            }
            else {
                $('#txtPagePrice').removeAttr('disabled', 'disabled');
            }
        }
    </script>
}
